import request from '@/utils/request'
import { subUrl } from '@/api/dev'
const tempUrl = `${subUrl}/order`
//用户
export function getUserList(data) {
  return request({
    url: `${tempUrl}/getUserList`,
    method: 'post',
    data,
  })
}
export function getUserGroup(data) {
  return request({
    url: `${tempUrl}/getUserGroup`,
    method: 'post',
    data,
  })
}
export function insertUser(data) {
  return request({
    url: `${tempUrl}/insertUser`,
    method: 'post',
    data,
  })
}

export function deleteUser(data) {
  return request({
    url: `${tempUrl}/deleteUser`,
    method: 'post',
    data,
  })
}

export function updateUser(data) {
  return request({
    url: `${tempUrl}/updateUser`,
    method: 'post',
    data,
  })
}
//部门
export function getDepartmentList(data) {
  return request({
    url: `${tempUrl}/getDepartmentList`,
    method: 'post',
    data,
  })
}
export function insertDepartment(data) {
  return request({
    url: `${tempUrl}/insertDepartment`,
    method: 'post',
    data,
  })
}

export function deleteDepartment(data) {
  return request({
    url: `${tempUrl}/deleteDepartment`,
    method: 'post',
    data,
  })
}

export function updateDepartment(data) {
  return request({
    url: `${tempUrl}/updateDepartment`,
    method: 'post',
    data,
  })
}
//项目
export function getProjectList(data) {
  return request({
    url: `${tempUrl}/getProjectList`,
    method: 'post',
    data,
  })
}
//获取项目/费用号
export function getProjectGroup(data) {
  return request({
    url: `${tempUrl}/getProjectGroup`,
    method: 'post',
    data,
  })
}
export function insertProject(data) {
  return request({
    url: `${tempUrl}/insertProject`,
    method: 'post',
    data,
  })
}

export function deleteProject(data) {
  return request({
    url: `${tempUrl}/deleteProject`,
    method: 'post',
    data,
  })
}

export function updateProject(data) {
  return request({
    url: `${tempUrl}/updateProject`,
    method: 'post',
    data,
  })
}
export function getProjectById(data) {
  return request({
    url: `${tempUrl}/getProjectById`,
    method: 'post',
    data,
  })
}
//工单等级
export function getWorkOrderLevelList(data) {
  return request({
    url: `${tempUrl}/getWorkOrderLevelList`,
    method: 'post',
    data,
  })
}
export function insertWorkOrderLevel(data) {
  return request({
    url: `${tempUrl}/insertWorkOrderLevel`,
    method: 'post',
    data,
  })
}

export function deleteWorkOrderLevel(data) {
  return request({
    url: `${tempUrl}/deleteWorkOrderLevel`,
    method: 'post',
    data,
  })
}

export function updateWorkOrderLevel(data) {
  return request({
    url: `${tempUrl}/updateWorkOrderLevel`,
    method: 'post',
    data,
  })
}
//职级
export function getRankList(data) {
  return request({
    url: `${tempUrl}/getRankList`,
    method: 'post',
    data,
  })
}
export function insertRank(data) {
  return request({
    url: `${tempUrl}/insertRank`,
    method: 'post',
    data,
  })
}

export function deleteRank(data) {
  return request({
    url: `${tempUrl}/deleteRank`,
    method: 'post',
    data,
  })
}

export function updateRank(data) {
  return request({
    url: `${tempUrl}/updateRank`,
    method: 'post',
    data,
  })
}
//请假信息维护
export function getLeaveInfoList(data) {
  return request({
    url: `${tempUrl}/getLeaveInfoList`,
    method: 'post',
    data,
  })
}
export function insertLeaveInfo(data) {
  return request({
    url: `${tempUrl}/insertLeaveInfo`,
    method: 'post',
    data,
  })
}

export function deleteLeaveInfo(data) {
  return request({
    url: `${tempUrl}/deleteLeaveInfo`,
    method: 'post',
    data,
  })
}

export function updateLeaveInfo(data) {
  return request({
    url: `${tempUrl}/updateLeaveInfo`,
    method: 'post',
    data,
  })
}
//出差信息维护
export function getAwayInfoList(data) {
  return request({
    url: `${tempUrl}/getAwayInfoList`,
    method: 'post',
    data,
  })
}
export function insertAwayInfo(data) {
  return request({
    url: `${tempUrl}/insertAwayInfo`,
    method: 'post',
    data,
  })
}

export function deleteAwayInfo(data) {
  return request({
    url: `${tempUrl}/deleteAwayInfo`,
    method: 'post',
    data,
  })
}

export function updateAwayInfo(data) {
  return request({
    url: `${tempUrl}/updateAwayInfo`,
    method: 'post',
    data,
  })
}
//夹具机标准版代码开发合并情况
export function getFixtureMachinesList(data) {
  return request({
    url: `${tempUrl}/getFixtureMachinesList`,
    method: 'post',
    data,
  })
}
export function insertFixtureMachines(data) {
  return request({
    url: `${tempUrl}/insertFixtureMachines`,
    method: 'post',
    data,
  })
}

export function deleteFixtureMachines(data) {
  return request({
    url: `${tempUrl}/deleteFixtureMachines`,
    method: 'post',
    data,
  })
}

export function updateFixtureMachines(data) {
  return request({
    url: `${tempUrl}/updateFixtureMachines`,
    method: 'post',
    data,
  })
}
//单机类标准版代码合并情况：共合并*次
export function getSingleMachineStandardList(data) {
  return request({
    url: `${tempUrl}/getSingleMachineStandardList`,
    method: 'post',
    data,
  })
}
export function insertSingleMachineStandard(data) {
  return request({
    url: `${tempUrl}/insertSingleMachineStandard`,
    method: 'post',
    data,
  })
}

export function deleteSingleMachineStandard(data) {
  return request({
    url: `${tempUrl}/deleteSingleMachineStandard`,
    method: 'post',
    data,
  })
}

export function updateSingleMachineStandard(data) {
  return request({
    url: `${tempUrl}/updateSingleMachineStandard`,
    method: 'post',
    data,
  })
}

//工单
export function getWorkOrderListCustomerDemand(data) {
  return request({
    url: `${tempUrl}/getWorkOrderListCustomerDemand`,
    method: 'post',
    data,
  })
}
export function getWorkOrderListByDepartId(data) {
  return request({
    url: `${tempUrl}/getWorkOrderListByDepartId`,
    method: 'post',
    data,
  })
}
export function getAllWorkOrderListBy(data) {
  return request({
    url: `${tempUrl}/getAllWorkOrderListBy`,
    method: 'post',
    data,
  })
}
export function getWorkOrderTotalByDepartId(data) {
  return request({
    url: `${tempUrl}/getWorkOrderTotalByDepartId`,
    method: 'post',
    data,
  })
}
export function getWorkOrderTotalByuserId(data) {
  return request({
    url: `${tempUrl}/getWorkOrderTotalByuserId`,
    method: 'post',
    data,
  })
}

export function getWorkOrderTotalBarAll(data) {
  return request({
    url: `${tempUrl}/getWorkOrderTotalBarAll`,
    method: 'post',
    data,
  })
}
export function getWorkOrderTotalBarByDepartmentId(data) {
  return request({
    url: `${tempUrl}/getWorkOrderTotalBarByDepartmentId`,
    method: 'post',
    data,
  })
}
export function insertWorkOrderList(data) {
  return request({
    url: `${tempUrl}/insertWorkOrderList`,
    method: 'post',
    data,
  })
}
export function deleteWorkOrder(data) {
  return request({
    url: `${tempUrl}/deleteWorkOrder`,
    method: 'post',
    data,
  })
}
export function finishWorkOrder(data) {
  return request({
    url: `${tempUrl}/finishWorkOrder`,
    method: 'post',
    data,
  })
}
export function updateWorkOrder(data) {
  return request({
    url: `${tempUrl}/updateWorkOrder`,
    method: 'post',
    data,
  })
}
export function updateWorkOrderNew(data) {
  return request({
    url: `${tempUrl}/updateWorkOrderNew`,
    method: 'post',
    data,
  })
}

//报表、

export function getReporterPersonalPercent(data) {
  return request({
    url: `${tempUrl}/getReporterPersonalPercent`,
    method: 'post',
    data,
  })
}

export function getfetchTableAllData(data) {
  return request({
    url: `${tempUrl}/getfetchTableAllData`,
    method: 'post',
    data,
  })
}

//导出
// export function exportReporterPersonalPercent(data) {
//   return request({
//     url: `${tempUrl}/exportReporterPersonalPercent`,
//     method: 'post',
//     data,
//     responseType: 'blob',
//   })
// }
